using System;
using System.Reflection;
namespace foundation.events
{
    public interface IEventDispatcher
    {
        void AddEventListener(object type, Action<EventX> listener, int priority = 0);
        void AddEventListener(object type, MethodInfo listener, object thisobj, int priority = 0);
        void RemoveEventListener(object type, Action<EventX> listener);
        void RemoveEventListener(object type, MethodInfo listener, object thisobj);
        void DispatchEvent(EventX e);
        void SimpleDispatch(object type, object data, bool bubbles = false);
    }
}